package com.btobtob.a.biz.user.converter;

import com.btobtob.a.biz.user.dto.clientobject.WeatherForecastCO;
import com.btobtob.a.biz.user.dto.command.WeatherForecastCmd;
import com.btobtob.a.biz.user.entity.WeatherForecast;
import org.mapstruct.*;
import org.mapstruct.factory.Mappers;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface WeatherForecastConverter {

    WeatherForecastConverter INSTANCE = Mappers.getMapper(WeatherForecastConverter.class);

    WeatherForecast from(WeatherForecastCmd source);

    @InheritInverseConfiguration
    WeatherForecastCO to(WeatherForecast source);

    @InheritInverseConfiguration
    WeatherForecastCO update(WeatherForecast source, @MappingTarget WeatherForecastCO target);

}
